<?php
if(empty($meettings)){
    echo '<h1 class="logo-name" style="font-size: 30px;text-align: center;letter-spacing: 0px">暂无约会记录..</h1>';
}else{ ?>
    <table class="table" style="margin-top: -10px">
        <?php
        foreach($meettings as $meeting){
            $meet = [
                'mm_id'=>$meeting['mm_id'],
                'mm_date'=>$meeting['mm_date'],
                'mu_id'=>$meeting['mu_id']==$user['mi_id'] ? $meeting['mu_targrt']:$meeting['mu_id']
            ]
            ?>
            <tr><td style="border-top: 0px;padding: 3px"><?=$meeting['mm_date'] ?></td>
                <td  style="border-top: 0px;padding: 3px"><?=empty($targets[$meet['mu_id']]) ? '信息丢失':$targets[$meet['mu_id']] ?></td>
                <td  style="border-top: 0px;padding: 3px"><a class="btn btn-white btn-xs" data-toggle="modal" data-target="#myMettingDialog" data-data='<?= \yii\helpers\Json::encode($meet) ?>'>
                        <i class="fa fa-edit"></i>
                    </a> <?php if(Yii::$app->user->identity->ma_type<3){?><a class="btn btn-white btn-xs" id="meet_del" onclick="MeetDel(<?=$meeting['mm_id'] ?>)">
                        <i class="fa fa-trash-o"></i>
                    </a><?php } ?></td>
            </tr>
            <?php
        }?>
    </table>
    <div class="f-r" style="text-align: center;margin-top: -20px">
        <?= \yii\widgets\LinkPager::widget([
            'pagination'=>$meetPage,
            'class'=>'.pagination-sm',
            'linkOptions' => ['onclick' => 'return goMeetPage(this)'],
            'nextPageLabel' => '>>',
            'prevPageLabel' => '<<',
            'maxButtonCount' => 5,
        ]) ?>
    </div>
    <?php
}
?>
